<template>
  <div class="course_management">
    <!-- 版心 -->
    <div class="course_wrap">
      <!-- 头部 -->
      <div class="header">
        <div class="header_top">
          <el-button size="medium"><a :href="'http://yogahome.top/yujiaextend/gymadmin/downloadYogaActionInfo?'+'starTime='+ starTime+'&'+'endTime='+endTime">下载课表</a></el-button>
          <el-button @click="newBuilt" size="medium">应用上周课表</el-button>
        </div>
        <div class="header_bottom">
          <div class="header_left">
            <span>场馆名称：</span>	<span>{{GYM_SESSIONID.gym_name}}</span>
            <!-- <el-select v-model="value"  @change="cx" placeholder="请选择">
              <el-option
                v-for="item in options9"
                :key="item.value"
                :label="item.label"
                :value="item.gym_name"
              ></el-option>
            </el-select> -->

          </div>
          <div class="header_right">
            <div class="header_data">
              <p @click="sz()">上周</p>
              <span><<</span>
              <button>{{starTime}}</button>
              <span>>></span>
              <p @click="xz()">下周</p>
            </div>
            <div class="last_week" @click="bz">返回本周</div>
          </div>
        </div>
      </div>

      <!-- 头部结束 -->
      <!-- 日期添加课程 -->
      <div class="course_class">
        <ul class="course_data">
          <li v-for="(item,index) in week" :key="index"  :class="{'active':index%2 != 0}" >
           <div class="course_li">
              <span>{{item.date}}</span>
            <font>{{item.week}}</font>
           </div>
           <div class="add">
             <!-- v-for="(list,index) in data" :key="index"  :class="{'active':index%2 != 0}" -->
              <!-- <ul v-for="(list,index) in item.actions" :key="index">
              <div class="add_success" :class="{'addactive':index%2 != 0}">
                <div class="success_top" @click.stop="success(item,index)">
                   <p class="add_date">{{list.action_time | formatDate}}~{{list.end_time | formatDate}}</p>
                <p>{{list.action_name}}</p>
                <p>{{list.coach_name}}</p>
                <p>{{list.room}}</p>
                <div class="add_order">
                  <span>{{list.success_people}}人预约</span>
                </div>
                <p>人数限制{{list.min_people}}-{{list.max_people}}人</p>
                </div>
                 <div class="success_shade" v-show="shadeActive" @click.stop="successHide">
                    <span>
                      <i @click="xiukb(list)" class="el-icon-edit"></i>
                    </span>
                   <span @click="scz(list)">
                      <i class="el-icon-delete"></i>
                    </span>
                </div>
              </div>
             
          </ul> -->
           <!-- <li  @click.stop="addClass(index,item)" :class="{'active':index%2 != 0}" class="add_xixi">
              <i class="el-icon-circle-plus-outline"></i>
              <p>添加课程</p>
            </li> -->
        </div>
          </li>
        </ul>
      </div>
    </div>
       <div id='jiedian' style="height: 100%;overflow-y: auto;">
          <ul style="margin-left: 3%;">
           <div class='yanshi'>
                <div  v-for="(list,index) in week[0].actions" >
                      <li class='licen' :style="{'background':list.color}">
                      <div @click.stop="success(index)">
                          <p>{{list.action_time | formatDate}}~{{list.end_time | formatDate}}</p>
                          <p>{{list.action_name}}</p>
                          <p>{{list.coach_name}}</p>
                          <p>{{list.room}}</p>
                          <p>{{list.success_people}}人预约</p>
                          <p>人数限制{{list.min_people}}-{{list.max_people}}人</p>
                          <div class="success_shade" v-show="shadeActive" @click.stop="successHide(index)" ref="reference">
                                  <span>
                                    <i @click="xiukb(list)" style="position: absolute;z-index: 99999;color: white;top: 43%;left: 30%;" class="el-icon-edit"></i>
                                  </span>
                                <span @click="scz(list)">
                                    <i class="el-icon-delete" style="position: absolute;color: white;top: 43.5%;right: 30%;"></i>
                                  </span>
                            </div>
                      </div>
                    </li>
                </div>
                  <div>
                     <li  @click.stop="addClass0()"  class="add_xixi" style="background:white">
                          <i class="el-icon-circle-plus-outline"></i>
                          <p>添加课程</p>
                    </li>
                  </div>
                    <div>
                     <li class="add_xixi" style="background:white;opacity: 0;">
                          <i class="el-icon-circle-plus-outline"></i>
                          <p>添加课程</p>
                    </li>
                  </div>
           </div>
            <div class='yanshi'>
               <div v-for="(list,index) in week[1].actions">
                    <li class='licen'  :style="{'background':list.color}">
                    <div @click.stop="success2(index)">
                        <p>{{list.action_time | formatDate}}~{{list.end_time | formatDate}}</p>
                        <p>{{list.action_name}}</p>
                        <p>{{list.coach_name}}</p>
                        <p>{{list.room}}</p>
                        <p>{{list.success_people}}人预约</p>
                        <p>人数限制{{list.min_people}}-{{list.max_people}}人</p>
                        <div class="success_shade" v-show="shadeActive" @click.stop="successHide2(index)" ref="reference2">
                                <span>
                                  <i @click="xiukb(list)" style="position: absolute;z-index: 99999;color: white;top: 43%;left: 30%;" class="el-icon-edit"></i>
                                </span>
                              <span @click="scz(list)">
                                  <i class="el-icon-delete"  style="position: absolute;color: white;top: 43.5%;right: 30%;"></i>
                                </span>
                          </div>
                    </div>
                  </li>
               </div>
                    <li  @click.stop="addClass1(index,item)"  class="add_xixi">
                        <i class="el-icon-circle-plus-outline"></i>
                        <p>添加课程</p>
                  </li>
               <div>
                     <li class="add_xixi" style="background:white;opacity: 0;">
                          <i class="el-icon-circle-plus-outline"></i>
                    </li>
                  </div>
           </div>
            <div class='yanshi'>
                <div v-for="(list,index) in week[2].actions">
                      <li  :style="{'background':list.color}" class='licen' >
                    <div @click.stop="success3(index)">
                        <p>{{list.action_time | formatDate}}~{{list.end_time | formatDate}}</p>
                        <p>{{list.action_name}}</p>
                        <p>{{list.coach_name}}</p>
                        <p>{{list.room}}</p>
                        <p>{{list.success_people}}人预约</p>
                        <p>人数限制{{list.min_people}}-{{list.max_people}}人</p>
                        <div class="success_shade" v-show="shadeActive" @click.stop="successHide3(index)" ref="reference3">
                                <span>
                                  <i @click="xiukb(list)" style="position: absolute;z-index: 99999;color: white;top: 43%;left: 30%;" class="el-icon-edit"></i>
                                </span>
                              <span @click="scz(list)">
                                  <i class="el-icon-delete"  style="position: absolute;color: white;top: 43.5%;right: 30%;"></i>
                                </span>
                          </div>
                    </div>
                  </li>
                </div>
                 <li  @click.stop="addClass2(index,item)" class="add_xixi" style="background:white">
                        <i class="el-icon-circle-plus-outline"></i>
                        <p>添加课程</p>
                  </li>
                   <div>
                     <li class="add_xixi" style="background:white;opacity: 0;">
                          <i class="el-icon-circle-plus-outline"></i>
                    </li>
                  </div>
           </div>
           <div class='yanshi'>
              <div v-for="(list,index) in week[3].actions">
                  <li :style="{'background':list.color}" class='licen' >
                <div @click.stop="success4(index)">
                    <p>{{list.action_time | formatDate}}~{{list.end_time | formatDate}}</p>
                    <p>{{list.action_name}}</p>
                    <p>{{list.coach_name}}</p>
                    <p>{{list.room}}</p>
                    <p>{{list.success_people}}人预约</p>
                    <p>人数限制{{list.min_people}}-{{list.max_people}}人</p>
                    <div class="success_shade" v-show="shadeActive" @click.stop="successHide4(index)" ref="reference4">
                            <span>
                              <i @click="xiukb(list)" style="position: absolute;z-index: 99999;color: white;top: 43%;left: 30%;" class="el-icon-edit"></i>
                            </span>
                          <span @click="scz(list)">
                              <i class="el-icon-delete"  style="position: absolute;color: white;top: 43.5%;right: 30%;"></i>
                            </span>
                      </div>
                </div>
               </li>
              </div>
                <li  @click.stop="addClass3(index,item)"  class="add_xixi">
                    <i class="el-icon-circle-plus-outline"></i>
                    <p>添加课程</p>
                </li>
                 <div>
                     <li class="add_xixi" style="background:white;opacity: 0;">
                          <i class="el-icon-circle-plus-outline"></i>
                    </li>
                  </div>
           </div>
            <div class='yanshi'>
               <div v-for="(list,index) in week[4].actions">
                  <li :style="{'background':list.color}" class='licen'>
                <div @click.stop="success5(index)">
                    <p>{{list.action_time | formatDate}}~{{list.end_time | formatDate}}</p>
                    <p>{{list.action_name}}</p>
                    <p>{{list.coach_name}}</p>
                    <p>{{list.room}}</p>
                    <p>{{list.success_people}}人预约</p>
                    <p>人数限制{{list.min_people}}-{{list.max_people}}人</p>
                    <div class="success_shade" v-show="shadeActive" @click.stop="successHide5(index)" ref="reference5" >
                            <span>
                              <i @click="xiukb(list)" style="position: absolute;z-index: 99999;color: white;top: 43%;left: 30%;" class="el-icon-edit"></i>
                            </span>
                          <span @click="scz(list)">
                              <i class="el-icon-delete"  style="position: absolute;color: white;top: 43.5%;right: 30%;"></i>
                            </span>
                      </div>
                </div>
               </li>
               </div>
                 <li  @click.stop="addClass4(index,item)"  class="add_xixi" style="background:white">
                    <i class="el-icon-circle-plus-outline"></i>
                    <p>添加课程</p>
              </li>
               <div>
                     <li class="add_xixi" style="background:white;opacity: 0;">
                          <i class="el-icon-circle-plus-outline"></i>
                    </li>
                  </div>
           </div>
           <div class='yanshi'>
               <div v-for="(list,index) in week[5].actions">
                  <li :style="{'background':list.color}"  class='licen'>
                <div @click.stop="success6(index)">
                    <p>{{list.action_time | formatDate}}~{{list.end_time | formatDate}}</p>
                    <p>{{list.action_name}}</p>
                    <p>{{list.coach_name}}</p>
                    <p>{{list.room}}</p>
                    <p>{{list.success_people}}人预约</p>
                    <p>人数限制{{list.min_people}}-{{list.max_people}}人</p>
                    <div class="success_shade" v-show="shadeActive" @click.stop="successHide6(index)" ref="reference6">
                            <span>
                              <i @click="xiukb(list)" style="position: absolute;z-index: 99999;color: white;top: 43%;left: 30%;" class="el-icon-edit"></i>
                            </span>
                          <span @click="scz(list)">
                              <i class="el-icon-delete"  style="position: absolute;color: white;top: 43.5%;right: 30%;"></i>
                            </span>
                      </div>
                </div>
               </li>
               </div>
                <li  @click.stop="addClass5(index,item)"  class="add_xixi">
                    <i class="el-icon-circle-plus-outline"></i>
                    <p>添加课程</p>
              </li>
               <div>
                     <li class="add_xixi" style="background:white;opacity: 0;">
                          <i class="el-icon-circle-plus-outline"></i>
                    </li>
                  </div>
           </div>
            <div class='yanshi'>
               <div v-for="(list,index) in week[6].actions" >
                <li class='licen' :style="{'background':list.color}">
                <div @click.stop="success7(index)">
                    <p>{{list.action_time | formatDate}}~{{list.end_time | formatDate}}</p>
                    <p>{{list.action_name}}</p>
                    <p>{{list.coach_name}}</p>
                    <p>{{list.room}}</p>
                    <p>{{list.success_people}}人预约</p>
                    <p>人数限制{{list.min_people}}-{{list.max_people}}人</p>
                    <div class="success_shade" v-show="shadeActive" @click.stop="successHide7(index)" ref="reference7">
                            <span>
                              <i @click="xiukb(list)" style="position: absolute;z-index: 99999;color: white;top: 43%;left: 30%;" class="el-icon-edit"></i>
                            </span>
                          <span @click="scz(list)">
                              <i class="el-icon-delete"  style="position: absolute;color: white;top: 43.5%;right: 30%;"></i>
                            </span>
                      </div>
                </div>
               </li>
               </div>
               <li  @click.stop="addClass6(index,item)"  class="add_xixi" style="background:white">
                    <i class="el-icon-circle-plus-outline"></i>
                    <p>添加课程</p>
              </li>
               <div>
                     <li class="add_xixi" style="background:white;opacity: 0;">
                          <i class="el-icon-circle-plus-outline"></i>
                    </li>
                  </div>
           </div>
          </ul>
      </div>
    <!-- 版心结束 -->
    <!-- 添加课程弹窗 -->
    <div class="add_course" v-show="addActive">
      <div class="add_join">
        <div class="add_top">
          <p>{{state}}课表</p>
          <span class="el-icon-circle-close" @click.stop="hide"></span>
        </div>
        <div class="add_bottom">
          <ul>
            <li>
              <div class="add_choose">
                <span>选择课程：</span>
                <el-select v-model="value10" filterable  @change="xzkc()" placeholder="请选择">
                  <el-option
                    v-for="item in options10"
                    :key="item.value"
                    :label="item.label"
                    :value="item.action_name"
                  ></el-option>
                </el-select>
              </div>
              <router-link to='stencil_plate'><p>
                没有可选课程？
                <span>去添加课程模版>></span>
              </p></router-link>
            </li>
            <li>
              <div class="add_choose">
                <span>选择老师：</span>
                <el-input v-model="ls" style="margin-left: -2px;width: 41%;" placeholder="请输入内容"></el-input>
              </div>
            </li>
            <li>
              <div class="add_choose">
                <span>选择教室：</span>
                <el-input v-model="js" style="margin-left: -2px;width: 41%;" placeholder="请输入内容"></el-input>
              </div>
            </li>
               <li>
              <div class="add_choose">
                <span>开始日期：</span>
                 <div class="block">
                <el-date-picker
                  v-model="kcrq"
                  style="width: 90%;"
                  type="date"
                  placeholder="选择日期">
                </el-date-picker>
              </div>
              </div>
            </li>
            <li>
              <div class="add_choose">
                <span>上课时间：</span>
                <el-time-picker
                  v-model="sksj"
                  placeholder="任意时间点"
                  format="HH:mm"
                ></el-time-picker>
              </div>
            </li>
            <li>
              <div class="add_choose">
                <span>结束时间：</span>
                <el-time-picker
                  v-model="jssj"
                  format="HH:mm"
                  placeholder="任意时间点"
                ></el-time-picker>
              </div>
            </li>
            <li>
              <div class="add_choose">
                <span>人数限制：</span>
                <el-input v-model="zs" placeholder="最少" style="width: 22%"></el-input>
                <font>到</font>
                <el-input v-model="zd" placeholder="最多" style="width: 22%;"></el-input>
              </div>
            </li>
            <li>
              <div class="add_choose">
                <span>课程难度：</span>
                <el-rate v-model="nd"></el-rate>
              </div>
            </li>
            <li>
              <div class="add_choose">
                <span>课程颜色：</span>
                <el-color-picker v-model="color" show-alpha :predefine="predefineColors"></el-color-picker>
              </div>
            </li>
            <li class="add_img">
              <div class="add_choose">
                <span>课程图片：</span>
                <img :src='image' alt>
                <!-- <input type="file" class="file"> -->
                <input type="file" id="file" @change="imageChange()" class="file">
                <button>上传照片</button>
              </div>
            </li>
          </ul>
        </div>
        <div class="add_submit" @click.stop="addSubmit">{{state}}添加</div>
      </div>
    </div>
    <!-- 添加课程弹窗结束 -->
  </div>
</template>
<script>
export default {
  data() {
    return {
      options: [],
      value: "",
      weekArr:"",
      input:'',
      value1: 3,
      type:'',
      week:'',
      ls:"",
      xzsj:'',
      szsj:'',
      js:"",
      sksj:'',
      jssj:'',
      mrsj:'',
      kcrq:'',
      options9:'',
      options10:'',
      value10:'',
      zs:'',
      zd:'',
      nd:'',
      mbId:'',
      gid:'',
      bzsj:'',
      GYM_SESSIONID:'',
      state:'',
      image:'',
      value2: new Date(),
      color: '',
      predefineColors: [
        "#ff4500",
        "#ff8c00",
        "#ffd700",
        "#90ee90",
        "#00ced1",
        "#1e90ff",
        "#c71585",
        "rgba(255, 69, 0, 0.68)",
        "rgb(255, 120, 0)",
        "hsv(51, 100, 98)",
        "hsva(120, 40, 94, 0.5)",
        "hsl(181, 100%, 37%)",
        "hsla(209, 100%, 56%, 0.73)",
        "#c7158577"
      ],
      addActive:false,
      shadeActive:false,
      starTime:'',
      starTime:''
    };
  },
  created(){
    let GYM_SESSIONID = JSON.parse(

				window.localStorage.getItem("gym_sessionid")
			);
			this.GYM_SESSIONID = GYM_SESSIONID
    this.ajax()
    this.ajaxs()
  },
  filters: {
    formatDate: function(value) {
      let date = new Date(value);
      let MM = date.getMonth() + 1;
      MM = MM < 10 ? "0" + MM : MM;
      let d = date.getDate();
      d = d < 10 ? "0" + d : d;
      let h = date.getHours();
      h = h < 10 ? "0" + h : h;
      let m = date.getMinutes();
      m = m < 10 ? "0" + m : m;
      return h + ":" + m;
    }
  },
  methods: {
     ajaxs(){
        var arr=this.options10
          for (var i=0;i<arr.length;i++){
            if(this.value10 == arr[i].action_name){
               var gymId=arr[i].id
            }
          }
       var obj={
            gymId:this.gid,
            templateId:gymId
        }
        let _this = this;
        let qs = require("qs");
        this.$axios.post("/yujiaextend/gymadmin/findTemplateByAdminidAndTemplateId", qs.stringify(obj), {
            headers: {
            "Content-Type": "application/x-www-form-urlencoded"
            }
        })
        .then(function(response) {
            // _this.seen1 = true; 
            // _this.=response.data.data.action_name
            _this.ls=response.data.data.coach_name
            _this.js=response.data.data.room
            _this.zd=response.data.data.max_people
            _this.zs=response.data.data.min_people
            _this.nd=response.data.data.level
            _this.sksj=response.data.data.action_time
            _this.jssj=response.data.data.end_time
            _this.color=response.data.data.color
            _this.image=response.data.data.coach_photo
            _this.td=response.data.data.characteristic
            _this.rq=response.data.data.apply_people
            _this.pl=response.data.data.frequency
            // var str = response.data.data.action_date;
            str = str.replace(/-/g, '/');
            var date = new Date(str);
            _this.kcrq=date.setDate(date.getDate())
        })
        .catch((error)=> {
            console.log(error);
        });
    },
     scz(item){
       console.log(item)
      this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
        let obj = {
            actionid:item.id,
            status:6
        }
        let _this = this;
        let qs = require("qs");
        this.$axios.post("/yujiaextend/gymadmin/updateYogaGymUserStateByActionId", qs.stringify(obj), {
            headers: {
            "Content-Type": "application/x-www-form-urlencoded"
            }
        })
        .then(function(response) {
             let obj = {
             gymId:_this.gid,
             gymActionId:item.id
          }
          _this.$axios.post("/yujiaextend/gymadmin/deleteGymActionByActionIdBySuperAdmin", qs.stringify(obj), {
              headers: {
              "Content-Type": "application/x-www-form-urlencoded"
              }
          })
          .then(function(response) {
            if(response.data.code == 1){
                  _this.$message({
                      type: 'success',
                      message: '删除成功!'
                  });
                  var sj
                  if(_this.szsj != ''){
                    sj=_this.szsj
                  }
                  if(_this.xzsj != ''){
                    sj=_this.xzsj
                  }
                  _this.ajax(sj)
              }else{
                  _this.$message({
                      type: 'error',
                      message: '删除失败!'
                  });
              }
          })
          .catch((error)=> {
              console.log(error);
          });
        
        })
        .catch(function(error) {
            console.log(error);
        });
        }).catch(() => {
          this.$message({
            type: 'info',
            message: '已取消删除'
          });          
        });
     },
     xiukb(item){
        this.state='修改'
        this.type='2'
        var obj={
            actionId:item.id
        }
        let _this = this;
        let qs = require("qs");
        this.$axios.post("/yujiaextend/gymadmin/findYogaGymActionByActionIdBySuperAdmin", qs.stringify(obj), {
            headers: {
            "Content-Type": "application/x-www-form-urlencoded"
            }
        })
        .then(function(response) {
            _this.addActive = true; 
            _this.mbId=response.data.data.id
            _this.value10=response.data.data.action_name
            _this.ls=response.data.data.coach_name
            _this.js=response.data.data.room
            _this.zd=response.data.data.max_people
            _this.zs=response.data.data.min_people
            _this.nd=response.data.data.level
            _this.sksj=response.data.data.action_time
            _this.jssj=response.data.data.end_time
            _this.color=response.data.data.color
            console.log(response.data.data.color)
            _this.image=response.data.data.coach_photo
            _this.td=response.data.data.characteristic
            _this.rq=response.data.data.apply_people
            _this.pl=response.data.data.frequency
            var str = response.data.data.action_date;
            str = str.replace(/-/g, '/');
            var date = new Date(str);
            _this.kcrq=date.setDate(date.getDate())
        })
        .catch((error)=> {
            console.log(error);
        });
     },
     xzkc(){
         var arr=this.options10
          for (var i=0;i<arr.length;i++){
            if(this.value10 == arr[i].action_name){
               var gymId=arr[i].id
            }
          }
       var obj={
            gymId:this.gid,
            templateId:gymId
        }
        let _this = this;
        let qs = require("qs");
        this.$axios.post("/yujiaextend/gymadmin/findTemplateByAdminidAndTemplateId", qs.stringify(obj), {
            headers: {
            "Content-Type": "application/x-www-form-urlencoded"
            }
        })
        .then(function(response) {
            _this.addActive = true; 
            // _this.=response.data.data.action_name
            _this.ls=response.data.data.coach_name
            _this.js=response.data.data.room
            _this.zd=response.data.data.max_people
            _this.zs=response.data.data.min_people
            _this.nd=response.data.data.level
            _this.sksj=response.data.data.action_time
            _this.jssj=response.data.data.end_time
            _this.color=response.data.data.color
            _this.image=response.data.data.coach_photo
            _this.td=response.data.data.characteristic
            _this.rq=response.data.data.apply_people
            _this.pl=response.data.data.frequency
            // var str = response.data.data.action_date;
            str = str.replace(/-/g, '/');
            var date = new Date(str);
            _this.kcrq=date.setDate(date.getDate())
        })
        .catch((error)=> {
            console.log(error);
        });
     },
     imageChange: function() {
            setTimeout(() => {
                var _this = this;
                var file = document.getElementById("file").files[0];
                // console.log(document.getElementById("file"));
                var formData = new FormData();
                formData.append("image", file);
                console.log(formData);
                let obj = {
                //请求的参数
                formData: formData
                };
                $.ajax({
                url: "http://yogahome.top/yujia/admin/uploadimage",
                xhrFields: {
                    withCredentials: true
                },
                type: "POST",
                cache: false,
                data: formData,
                processData: false,
                contentType: false,
                async: false,
                success: function(result) {
                    if (result.message == "文件路径生成成功") {
                    // mui.toast("图片上传成功");
                       _this.$message({
                        type: 'success',
                        message: '图片上传成功!'
                    });
                      _this.image = result.data;
                    } else if (result.code == "-1") {
                    // mui.toast(result.message);
                        _this.$message({
                        type: 'error',
                        message: '上传失败!'
                    });
                    }
                }
                });
            });
        },
    bz(){
      // this.ajax()
      var d=new Date()
      var year = d.getFullYear();
      var month = d.getMonth();
      var day = d.getDate();
      var hours = d.getHours();
      var min = d.getMinutes();
      if(day < 10){
        day='0'+day
      }
      if(month < 10){
        month='0'+month
      }
      var times=year+'-'+(Number(month)+1)+'-'+day
      // console.log(times)
       this.bzsj=times
      //  alert(times)
       this.ajax(times)
    },
    sz(){
        var dateTime=getDay(-7,this.starTime)
        this.ajax(dateTime)
        this.szsj=dateTime
        function getDay(day,starTime){  
              var today = new Date(starTime);  
              var targetday_milliseconds=today.getTime() + 1000*60*60*24*day;          
              today.setTime(targetday_milliseconds); 
              var tYear = today.getFullYear();  
              var tMonth = today.getMonth();  
              var tDate = today.getDate();  
              tMonth = doHandleMonth(tMonth + 1);  
              tDate = doHandleMonth(tDate);  
              return tYear+"-"+tMonth+"-"+tDate;  
          }
          function doHandleMonth(month){  
            var m = month;  
            if(month.toString().length == 1){  
                m = "0" + month;  
            }  
            return m;  
          }
    },
    xz(){
       var dateTime=getDay(7,this.starTime)
        this.xzsj=dateTime
        this.ajax(dateTime)
        function getDay(day,starTime){  
              var today = new Date(starTime);  
              var targetday_milliseconds=today.getTime() + 1000*60*60*24*day;          
              today.setTime(targetday_milliseconds); 
              var tYear = today.getFullYear();  
              var tMonth = today.getMonth();  
              var tDate = today.getDate();  
              tMonth = doHandleMonth(tMonth + 1);  
              tDate = doHandleMonth(tDate);  
              return tYear+"-"+tMonth+"-"+tDate;  
          }
          function doHandleMonth(month){  
            var m = month;  
            if(month.toString().length == 1){  
                m = "0" + month;  
            }  
            return m;  
          }
    },
    ajax(dateTime){
      var d=new Date()
      var year = d.getFullYear();
      var month = d.getMonth();
      var day = d.getDate();
      var hours = d.getHours();
      var min = d.getMinutes();
      var times=year+'-'+(Number(month)+1)+'-'+day+' '+hours+':'+min
        let _this = this;
        // let qs = require("qs");
        // this.$axios.post("yujiaextend/gymadmin/findAllGymBySuperAdmin", qs.stringify(), {
        //     headers: {
        //     "Content-Type": "application/x-www-form-urlencoded"
        //     }
        //   })
        //   .then(function(response) {
        //     _this.options9=response.data.data
        //     console.log(response.data.data)
        //     if(_this.gid == ''){
        //       _this.gid=response.data.data[0].id
        //       _this.value=response.data.data[0].gym_name
        //     }
            console.log(dateTime)
            if(dateTime != undefined){
              times=dateTime
            }
             let obj = {
              gymId:_this.gid,
              dateTime:times
            }
             let qs = require("qs");
            _this.$axios.post("/yujiaextend/gymadmin/findAllYogaGymActionBySuperAdmin", qs.stringify(obj), {
                headers: {
                "Content-Type": "application/x-www-form-urlencoded"
                }
            })
            .then((response) =>{
              _this.week=response.data.data
              _this.endTime=response.data.data[6].date
              _this.starTime=response.data.data[0].date
            })
            .catch(function(error) {
                console.log(error);
            });
             let obj1 = {
              gymId:_this.gid,
            }
              _this.$axios.post("/yujiaextend/gymadmin/findAllTemplateByAdminid", qs.stringify(obj1), {
                headers: {
                "Content-Type": "application/x-www-form-urlencoded"
                }
            })
            .then((response) =>{
              _this.options10=response.data.data
            })
            .catch(function(error) {
                console.log(error);
            });

          // })
          // .catch(function(error) {
          //     console.log(error);
          // });
    },
    cx(){
      var arr=this.options9
      for (var i=0;i<arr.length;i++){
        if(this.value == arr[i].gym_name){
          var gid=arr[i].id
        }
      }
      this.gid=gid
      this.ajax()
    },
    newBuilt(){
      this.$confirm('此操作将添加上周课表（此操作不可逆）, 是否继续?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          var starTime=this.starTime
          var obj={
                gymId:this.gid,
                dateTime:starTime
          }
            let _this = this;
            let qs = require("qs");
            this.$axios.post("/yujiaextend/gymadmin/copyLastWeebYogaGymActionBySuperAdmin", qs.stringify(obj), {
                headers: {
                "Content-Type": "application/x-www-form-urlencoded"
                }
            })
            .then(function(response) {
              //  _this.ajax()
               var sj
                  if(_this.szsj != ''){
                    sj=_this.szsj
                  }
                  if(_this.xzsj != ''){
                    sj=_this.xzsj
                  }
                  if(_this.bzsj != ''){
                    sj=_this.bzsj
                  }
                  _this.ajax(sj)
            })
            .catch((error)=> {
                console.log(error);
            });
        }).catch(() => {
          this.$message({
            type: 'info',
            message: '已取消删除'
          });          
        });
    },
    addClass0(index,item) {
      // var str =item.date
      // str = str.replace(/-/g, '/');
      // var date = new Date(str);
      // this.kcrq=date.setDate(date.getDate())
      // console.log(week[0].actions)
      // console.log(this.week[0].date)
      var date = new Date(this.week[0].date);
      this.kcrq=date.setDate(date.getDate())
      // console.log(week[0].actions)
      this.state='添加'
      this.type='1'
      this.addActive = true;
    },
     addClass1(index,item) {
      // var str =item.date
      // str = str.replace(/-/g, '/');
      // var date = new Date(str);
      // this.kcrq=date.setDate(date.getDate())
      // console.log(week[0].actions)
      // console.log(this.week[0].date)
      var date = new Date(this.week[1].date);
      this.kcrq=date.setDate(date.getDate())
      // console.log(week[0].actions)
      this.state='添加'
      this.type='1'
      this.addActive = true;
    },
     addClass2(index,item) {
      // var str =item.date
      // str = str.replace(/-/g, '/');
      // var date = new Date(str);
      // this.kcrq=date.setDate(date.getDate())
      // console.log(week[0].actions)
      // console.log(this.week[0].date)
      var date = new Date(this.week[2].date);
      this.kcrq=date.setDate(date.getDate())
      // console.log(week[0].actions)
      this.state='添加'
      this.type='1'
      this.addActive = true;
    },
     addClass3(index,item) {
      // var str =item.date
      // str = str.replace(/-/g, '/');
      // var date = new Date(str);
      // this.kcrq=date.setDate(date.getDate())
      // console.log(week[0].actions)
      // console.log(this.week[0].date)
      var date = new Date(this.week[3].date);
      this.kcrq=date.setDate(date.getDate())
      // console.log(week[0].actions)
      this.state='添加'
      this.type='1'
      this.addActive = true;
    },
     addClass4(index,item) {
      // var str =item.date
      // str = str.replace(/-/g, '/');
      // var date = new Date(str);
      // this.kcrq=date.setDate(date.getDate())
      // console.log(week[0].actions)
      // console.log(this.week[0].date)
      var date = new Date(this.week[4].date);
      this.kcrq=date.setDate(date.getDate())
      // console.log(week[0].actions)
      this.state='添加'
      this.type='1'
      this.addActive = true;
    },
      addClass5(index,item) {
      // var str =item.date
      // str = str.replace(/-/g, '/');
      // var date = new Date(str);
      // this.kcrq=date.setDate(date.getDate())
      // console.log(week[0].actions)
      // console.log(this.week[0].date)
      var date = new Date(this.week[5].date);
      this.kcrq=date.setDate(date.getDate())
      // console.log(week[0].actions)
      this.state='添加'
      this.type='1'
      this.addActive = true;
    },
      addClass6(index,item) {
      // var str =item.date
      // str = str.replace(/-/g, '/');
      // var date = new Date(str);
      // this.kcrq=date.setDate(date.getDate())
      // console.log(week[0].actions)
      // console.log(this.week[0].date)
      var date = new Date(this.week[6].date);
      this.kcrq=date.setDate(date.getDate())
      // console.log(week[0].actions)
      this.state='添加'
      this.type='1'
      this.addActive = true;
    },
    hide(){
        this.addActive = false
    },
    addSubmit(){
      var d=new Date(this.kcrq)
      var year = d.getFullYear();
      var month = d.getMonth();
      var day = d.getDate();
      var hours = d.getHours();
      var min = d.getMinutes();
       if(month < 10){
        month=('0'+(Number(month)+1))
      }else{
        month=Number(month)+1
      }
       if(day < 10){
        day='0'+day
      }
      var actionDate=year+'-'+month+'-'+day
      var d=new Date(this.sksj)
      // var year = d.getFullYear();
      // var month = d.getMonth();
      // var day = d.getDate();
      var hours = d.getHours();
      var min = d.getMinutes()
      // if(month < 10){
      //   month=('0'+(Number(month)+1))
      // }else{
      //   month=Number(month)+1
      // }
      //  if(day < 10){
      //   day='0'+day
      // }
       if(hours < 10){
        hours='0'+hours
      }
       if(min < 10){
        min='0'+min
      }
      var actionTime=year+'-'+month+'-'+day+' '+hours+':'+min
      console.log(actionTime)
      var d=new Date(this.jssj)
      // var year = d.getFullYear();
      // var month = d.getMonth();
      // var day = d.getDate();
      var hours = d.getHours();
      var min = d.getMinutes();
      //   if(month < 10){
      //   month=('0'+(Number(month)+1))
      // }else{
      //   month=Number(month)+1
      // }
      //  if(day < 10){
      //   day='0'+day
      // }
       if(hours < 10){
        hours='0'+hours
      }
       if(min < 10){
        min='0'+min
      }
      var endTime=year+'-'+month+'-'+day+' '+hours+':'+min
        var obj={
          gymId:this.gid,
          actionName:this.value10,
          coachName:this.ls,
          room:this.js,
          actionDate:actionDate,
          actionTime:actionTime,
          endTime:endTime,
          maxPeople:this.zd,
          minPeople:this.zs,
          level:this.nd,
          color:this.color,
          coachPhoto:this.image,
          type:this.type,
          actionId:this.mbId
        }
         console.log(obj)
        // return
        let _this = this;
        let qs = require("qs");
        this.$axios.post("/yujiaextend/gymadmin/addYogaGymActionBySuperAdmin", qs.stringify(obj), {
            headers: {
            "Content-Type": "application/x-www-form-urlencoded"
            }
        })
        .then(function(response) {
           if(response.data.code == 1){
                 _this.$message({
                    type: 'success',
                    message: _this.state+'成功!'
                });
                  _this.mc=''
                  _this.ls=''
                  _this.js=''
                  _this.zd=''
                  _this.zs=''
                  _this.nd=''
                  _this.sksj=''
                  _this.jssj=''
                  _this.color=''
                  _this.image=''
                  _this.td=''
                  _this.rq=''
                  _this.pl=''
                // _this.ajax()
                  _this.ajaxs()
                var sj
                  if(_this.szsj != ''){
                    sj=_this.szsj
                  }
                  if(_this.xzsj != ''){
                    sj=_this.xzsj
                  }
                  if(_this.bzsj != ''){
                    sj=_this.bzsj
                  }
                  _this.ajax(sj)
                _this.addActive = false;
            }else{
                 _this.$message({
                    type: 'error',
                    message: _this.state+'失败!'
                });
            }
        })
        .catch((error)=> {
            console.log(error);
        });

    },
    success(index){
      var arrs2=this.$refs.reference2
      if(arrs2 != undefined){
          for (var i=0;i<arrs2.length;i++){
          arrs2[i].style.display='none'
        }
      }     
      var arrs3=this.$refs.reference3
      if(arrs3 != undefined){
         for (var i=0;i<arrs3.length;i++){
          arrs3[i].style.display='none'
        }
      }
     
      var arrs4=this.$refs.reference4
      if(arrs4 != undefined){
        for (var i=0;i<arrs4.length;i++){
          arrs4[i].style.display='none'
        }
      }
      
      var arrs5=this.$refs.reference5
      if(arrs5 != undefined){
         for (var i=0;i<arrs5.length;i++){
          arrs5[i].style.display='none'
        }
      }
     
      var arrs6=this.$refs.reference6
      if(arrs6 != undefined){
         for (var i=0;i<arrs6.length;i++){
          arrs6[i].style.display='none'
        }
      }
     
      var arrs7=this.$refs.reference7
      if(arrs7 != undefined){
        for (var i=0;i<arrs7.length;i++){
          arrs7[i].style.display='none'
      }    
      }
       
      var arrs=this.$refs.reference
      for (var i=0;i<arrs.length;i++){
        if(index == i){
          arrs[i].style.display='block'
        }else{
          arrs[i].style.display='none'
        }
      }      
    },
    success2(index){
      var arrs=this.$refs.reference
      if(arrs != undefined){
         for (var i=0;i<arrs.length;i++){
          arrs[i].style.display='none'
        }
      }
     
      var arrs3=this.$refs.reference3
      if(arrs3 != undefined){
         for (var i=0;i<arrs3.length;i++){
          arrs3[i].style.display='none'
        }
      }

      var arrs4=this.$refs.reference4
      if(arrs4 != undefined){
        for (var i=0;i<arrs4.length;i++){
          arrs4[i].style.display='none'
        }
      }
      
      var arrs5=this.$refs.reference5
      if(arrs5 != undefined){
          for (var i=0;i<arrs5.length;i++){
          arrs5[i].style.display='none'
        }
      }
      
      var arrs6=this.$refs.reference6
      if(arrs6 != undefined){
        for (var i=0;i<arrs6.length;i++){
          arrs6[i].style.display='none'
        }
      }
      
      var arrs7=this.$refs.reference7
      if(arrs7 != undefined){
          for (var i=0;i<arrs7.length;i++){
            arrs7[i].style.display='none'
        }     
      }

      var arrs=this.$refs.reference2
      for (var i=0;i<arrs.length;i++){
        if(index == i){
          arrs[i].style.display='block'
        }else{
          arrs[i].style.display='none'
        }
      }     
    },
     success3(index){
      var arrs=this.$refs.reference
      if(arrs != undefined){
          for (var i=0;i<arrs.length;i++){
          arrs[i].style.display='none'
        }
      }
      
      var arrs2=this.$refs.reference2
      if(arrs2 != undefined){
            for (var i=0;i<arrs2.length;i++){
          arrs2[i].style.display='none'
        }
      }
    
      var arrs4=this.$refs.reference4
      if(arrs4 != undefined){
         for (var i=0;i<arrs4.length;i++){
        arrs4[i].style.display='none'
      }
      }
     
      var arrs5=this.$refs.reference5
      if(arrs5 != undefined){
         for (var i=0;i<arrs5.length;i++){
        arrs5[i].style.display='none'
      }
      }
     
      var arrs6=this.$refs.reference6
      if(arrs6 != undefined){
        for (var i=0;i<arrs6.length;i++){
        arrs6[i].style.display='none'
      }
      }
      
      var arrs7=this.$refs.reference7
      if(arrs7 != undefined){
         for (var i=0;i<arrs7.length;i++){
          arrs7[i].style.display='none'
      }   
      }
       
      var arrs=this.$refs.reference3
      for (var i=0;i<arrs.length;i++){
        if(index == i){
          arrs[i].style.display='block'
        }else{
          arrs[i].style.display='none'
        }
      }     
    },
      success4(index){
      var arrs=this.$refs.reference
      if(arrs != undefined){
        for (var i=0;i<arrs.length;i++){
        arrs[i].style.display='none'
      }
      }
      
      var arrs2=this.$refs.reference2
      if(arrs2 != undefined){
        for (var i=0;i<arrs2.length;i++){
        arrs2[i].style.display='none'
      }
      }
      
      var arrs3=this.$refs.reference3
      if(arrs3 != undefined){
          for (var i=0;i<arrs3.length;i++){
        arrs3[i].style.display='none'
      }
      }
    
      var arrs5=this.$refs.reference5
      if(arrs5 != undefined){
         for (var i=0;i<arrs5.length;i++){
        arrs5[i].style.display='none'
      }
      }
     
      var arrs6=this.$refs.reference6
      if(arrs6 != undefined){
        for (var i=0;i<arrs6.length;i++){
        arrs6[i].style.display='none'
      }
      }
      
      var arrs7=this.$refs.reference7
      if(arrs7 != undefined){
         for (var i=0;i<arrs7.length;i++){
          arrs7[i].style.display='none'
      }     
      }
     
      var arrs=this.$refs.reference4
      for (var i=0;i<arrs.length;i++){
        if(index == i){
          arrs[i].style.display='block'
        }else{
          arrs[i].style.display='none'
        }
      }     
    },
      success5(index){
      var arrs=this.$refs.reference
      if(arrs != undefined){
        for (var i=0;i<arrs.length;i++){
        arrs[i].style.display='none'
      }
      }
      
      var arrs2=this.$refs.reference2
      if(arrs2 != undefined){
        for (var i=0;i<arrs2.length;i++){
        arrs2[i].style.display='none'
      }
      }
      
      var arrs3=this.$refs.reference3
      if(arrs3 != undefined){
         for (var i=0;i<arrs3.length;i++){
        arrs3[i].style.display='none'
      }
      }
     
      var arrs4=this.$refs.reference4
      if(arrs4 != undefined){
         for (var i=0;i<arrs4.length;i++){
        arrs4[i].style.display='none'
      }
      }
     
      var arrs6=this.$refs.reference6
      if(arrs6 != undefined){
        for (var i=0;i<arrs6.length;i++){
        arrs6[i].style.display='none'
      }
      }
      
      var arrs7=this.$refs.reference7
      if(arrs7 != undefined){
         for (var i=0;i<arrs7.length;i++){
          arrs7[i].style.display='none'
      }      
      }
      
      var arrs=this.$refs.reference5
      for (var i=0;i<arrs.length;i++){
        if(index == i){
          arrs[i].style.display='block'
        }else{
          arrs[i].style.display='none'
        }
      }     
    },
     success6(index){
      var arrs=this.$refs.reference
      if(arrs != undefined){
         for (var i=0;i<arrs.length;i++){
        arrs[i].style.display='none'
      }
      }
     
      var arrs2=this.$refs.reference2
      if(arrs2 != undefined){
         for (var i=0;i<arrs2.length;i++){
        arrs2[i].style.display='none'
      }
      }
     
      var arrs3=this.$refs.reference3
      if(arrs3 != undefined){
         for (var i=0;i<arrs3.length;i++){
        arrs3[i].style.display='none'
      }
      }
     
      var arrs4=this.$refs.reference4
      if(arrs4 != undefined){
        for (var i=0;i<arrs4.length;i++){
        arrs4[i].style.display='none'
      }
      }
      
      var arrs5=this.$refs.reference5
      if(arrs5 != undefined){
        for (var i=0;i<arrs5.length;i++){
        arrs5[i].style.display='none'
      }
      }
      
      var arrs7=this.$refs.reference7
      if(arrs7 != undefined){
        for (var i=0;i<arrs7.length;i++){
          arrs7[i].style.display='none'
      }       
      }
      var arrs=this.$refs.reference6
      for (var i=0;i<arrs.length;i++){
        if(index == i){
          arrs[i].style.display='block'
        }else{
          arrs[i].style.display='none'
        }
      }     
    },
     success7(index){
      var arrs=this.$refs.reference
      if(arrs != undefined){
         for (var i=0;i<arrs.length;i++){
        arrs[i].style.display='none'
      }
      }
     
      var arrs2=this.$refs.reference2
      if(arrs2 !=  undefined){
      for (var i=0;i<arrs2.length;i++){
            arrs2[i].style.display='none'
          }
      }
    
      var arrs3=this.$refs.reference3
      if(arrs3 != undefined){
         for (var i=0;i<arrs3.length;i++){
        arrs3[i].style.display='none'
      }
      }
     
      var arrs4=this.$refs.reference4
      if(arrs4 != undefined){
         for (var i=0;i<arrs4.length;i++){
        arrs4[i].style.display='none'
      }
      }
     
      var arrs5=this.$refs.reference5
      if(arrs5 != undefined){
         for (var i=0;i<arrs5.length;i++){
        arrs5[i].style.display='none'
      }
      }
     
      var arrs6=this.$refs.reference6
      if(arrs6 != undefined){
         for (var i=0;i<arrs6.length;i++){
          arrs6[i].style.display='none'
      }     
      }
        
      var arrs=this.$refs.reference7
      for (var i=0;i<arrs.length;i++){
        if(index == i){
          arrs[i].style.display='block'
        }else{
          arrs[i].style.display='none'
        }
      }     
    },
    successHide(index){
      var arrs=this.$refs.reference
      for (var i=0;i<arrs.length;i++){
        if(index == i){
          arrs[i].style.display='none'
        }else{
          arrs[i].style.display='none'
        }
      }     
    },
      successHide2(index){
        var arrs=this.$refs.reference2
      for (var i=0;i<arrs.length;i++){
        if(index == i){
          arrs[i].style.display='none'
        }else{
          arrs[i].style.display='none'
        }
      }     
    },
      successHide3(index){
      var arrs=this.$refs.reference3
      for (var i=0;i<arrs.length;i++){
        if(index == i){
          arrs[i].style.display='none'
        }else{
          arrs[i].style.display='none'
        }
      }     
    },
      successHide4(index){
      var arrs=this.$refs.reference4
      for (var i=0;i<arrs.length;i++){
        if(index == i){
          arrs[i].style.display='none'
        }else{
          arrs[i].style.display='none'
        }
      }     
    },
      successHide5(index){
      var arrs=this.$refs.reference5
      for (var i=0;i<arrs.length;i++){
        if(index == i){
          arrs[i].style.display='none'
        }else{
          arrs[i].style.display='none'
        }
      }     
    },
      successHide6(index){
      var arrs=this.$refs.reference6
      for (var i=0;i<arrs.length;i++){
        if(index == i){
          arrs[i].style.display='none'
        }else{
          arrs[i].style.display='none'
        }
      }     
    },
     successHide7(index){
      var arrs=this.$refs.reference7
      for (var i=0;i<arrs.length;i++){
        if(index == i){
          arrs[i].style.display='none'
        }else{
          arrs[i].style.display='none'
        }
      }     
    },
  }
};
</script>
<style scoped>
.course_class[data-v-5f519daa] {
    width: 80%;
    margin-top: 20px;
    overflow: auto;
    height: 100%;
}
.course_class[data-v-4f1f2bef] {
    width: 81%;
    margin-top: 20px;
    overflow: auto;
    height: 100%;
    margin-left: 3px;
}
.course_management {
  width: 100%;
  height: 100%;
  background: #f2f2f2;
  position: absolute;
  left: 250px;
  top: 0;
  z-index: 2;
}
/* 版心 */
.course_wrap {
  width: 100%;
  /* height: 100%; */
  margin-left: 3%;
}
/* 版心结束 */
.active {
  background: #f8f8f8 ;
}
.addactive {
  background: #aed5a0;
}
/* 头部 */
.course_wrap .header {
  width: 100%;

  margin-top: 35px;
}
.course_wrap .header .header_top .el-button--medium:first-child {
  width: 90px;

  height: 34px;

  background: #2871e9;
}

.course_wrap .header .header_top .el-button--medium:nth-child(2) {
  background: #0947ae;
}
.el-button {
  color: #fff;
}
.course_wrap .header .header_bottom {
  width: 100%;
  margin-top: 15px;
  display: flex;

  align-items: center;

  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid #cdcdcd;
}
.course_wrap .header .header_bottom .header_left span {
  font-size: 15px;
  color: #000000;
}
.course_wrap .header .header_bottom .header_right {
  display: flex;

  align-items: center;

  padding-right: 20%;
}
.course_wrap .header .header_bottom .header_right .header_data {
  display: flex;
  align-items: center;
  margin-right: 35px;
}
.course_wrap .header .header_bottom .header_right .header_data p {
  font-size: 12px;
}
.course_wrap .header .header_bottom .header_right .header_data span {
  font-size: 12px;
}
.course_wrap .header .header_bottom .header_right .header_data button {
  padding: 4px 15px;
  border: none;
  outline: none;
  border-radius: 6px;
  background: #cdcdcd;
  color: #000000;
  font-size: 14px;
  margin: 0 15px;
}
.course_wrap .header .header_bottom .header_right .last_week {
  font-size: 14px;
  color: #286fe6;
  font-weight: bold;
  border-bottom: 1px solid #286fe6;
}
/* 头部结束 */
/* 日期添加课程 */
.course_class {
   width: 80%;
    margin-top: 20px;
    overflow: auto;
    height: 100%;
}
.course_class .course_data {
  width: 100%;
  display: flex;
  justify-content: space-around;
  /* align-items: center; */
 
}
.course_class .course_data>li {
  width: 14.28%;
  font-size: 14px;
  color: #000000;
  font-weight: bold;
}

.course_class .course_data>li .course_li{
  width: 100%;
  height: 50px;
  line-height: 50px;
  text-align: center;
  background: #ddeafe;

}
.course_class .course_data>li .course_li font{
  margin-left: 3px;
}
.course_class .course_data>li .add{
 width: 100%;
    /* display: flex;
  align-items: center; */
}
.course_class .course_data>li .add>ul{
  width: 100%;
   background: #fff;

}
.course_class .course_data>li .add>ul>li{
   width: 100%;
  height: 180px;
  padding-top: 56px;
  text-align: center;

}
.course_class .course_data>li .add>ul>li i{
   font-size: 20px;
  color: #cdcdcd;
}
.course_class .course_data>li .add>ul>li p{
   font-size: 14px;
  color: #cdcdcd;
  margin-top: 5px;
}
.add_xixi{
   width: 100%;
  height: 180px;
  padding-top: 56px;
  text-align: center;

}
.add_xixi i{
   font-size: 20px;
  color: #cdcdcd;
}
.add_xixi p{
    font-size: 14px;
  color: #cdcdcd;
  margin-top: 5px;
}
/* .course_class .add > ul {
  width: 14.48%;
    background: #fff;

} */
/* .course_class .add > ul li {
  width: 100%;
  height: 180px;
  padding-top: 56px;
  text-align: center;

} */
/* .course_class .add > ul li i {
  font-size: 20px;
  color: #cdcdcd;
} */
/* .course_class .add > ul li p {
  font-size: 14px;
  color: #cdcdcd;
  margin-top: 5px;
} */
.yanshi{
  width: 11.6%;
  float: left;
  margin-left: 3px;
}
.success_shade span[data-v-5f519daa] {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #aaaaaa;
    line-height: 32px;
    text-align: center;
    position: absolute;
    top: 32%;
    left: 47%;
    margin-left: -17%;
}
.licen{
  width: 100%;
  height: 208px;
  position: relative;
  margin-bottom: 1%;
  
}
.licen p:first-child{
 padding-top: 5%;
}
.licen p{
  padding: 0.5%;
  text-align: center
}
.licen div{
  width: 100%;
  height: 100%;
  
}
.course_class .add > ul .add_success {
  width: 100%;
  height: 180px;
  text-align: center;
  background: #cacbf0;
  position: relative;
  z-index: 1
}
.course_class[data-v-5f519daa][data-v-5f519daa] {
    width: 80%;
    margin-top: 3px;
    overflow: auto;
    height: 100%;
}
.course_class .add > ul .add_success .success_top {
  width: 100%;
  height: 180px;
}
.course_class .add > ul .add_success  .success_top .add_date{
  color: #0947ae;
  font-weight: bold;
}
.course_class .add > ul .add_success .success_top p{
  padding-top: 7px;
    font-size: 13px;
     color: #000000;
}
.course_class .add > ul .add_success .success_top p:nth-child(2){
  font-weight: bold;
}
.course_class .add > ul .add_success  .success_top .add_order{
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top:7px;
}
.course_class .add > ul .add_success  .success_top .add_order span{
  font-size: 13px;
  color: #010101;
}
 .success_shade{
  width: 100%;
  height: 100%;
  position: absolute;
  left:0;
  top: 0;
  /* z-index: 9; */
  background:black;
  opacity: 0.5;
  display: flex;
  align-items: center;
  justify-content: center
}
 .success_shade span{
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #aaaaaa;
  line-height: 32px;
  text-align: center
}
.success_shade span i{
  /* color: #ffffff; */
}
.success_shade span:nth-child(2){
  margin-left: 30px;
}
/* 日期添加课程结束 */
/* 添加课程弹窗 */
.add_course {
  width: 100%;

  height: 100%;
  position: absolute;

  left: -250px;

  top: 0;

  z-index: 5;

  background: rgba(0, 0, 0, 0.4);
}
.add_course .add_join {
  width: 560px;

  background: #fff;

  margin: 0 auto;
  margin-top: 35px;

  border-radius: 6px;

  box-shadow: 0px 1px 12px 0px rgba(41, 47, 61, 0.1);

  padding: 0 40px;

  padding-bottom: 40px;
}
.add_course .add_join .add_top {
  width: 100%;

  display: flex;

  align-items: center;

  justify-content: space-between;

  padding-top: 40px;
}
.course_class .course_data>li .add>ul[data-v-5f519daa] {
    width: 100%;
    background: #fff;
    margin-bottom: 15%;
}
.add_course .add_join .add_top p {
  font-size: 20px;

  padding-bottom: 5px;

  border-bottom: 3px solid #286fe6;

  color: #000;

  font-weight: bold;
}
.add_course .add_join .add_top span {
  font-size: 18px;

  display: inline-block;
}
.add_course .add_join .add_bottom {
  width: 100%;
}
.add_course .add_join .add_bottom ul {
  width: 100%;
}
.add_course .add_join .add_bottom ul li {
  width: 100%;
  margin-top: 30px;
}
.add_course .add_join .add_bottom ul li .add_choose {
  width: 100%;
  display: flex;
  align-items: center;
}
.add_course .add_join .add_bottom ul li .add_choose span {
  width: 20%;
  font-size: 14px;
  color: #000000;
}
.add_course .add_join .add_bottom ul li .add_choose .el-select {
  width: 40%;
}
.add_course .add_join .add_bottom ul li p {
  padding-left: 20%;
  margin-top: 10px;
  font-size: 14px;
  color: #808080;
}
.add_course .add_join .add_bottom ul li p span {
  font-size: 14px;
  color: #ae0909;
}
.add_course
  .add_join
  .add_bottom
  ul
  li
  .add_choose
  .el-button--success.is-plain {
  margin-left: 20px;
  background: #fff;
  color: #286fe6;
  font-size: 14px;
  border: 1px solid #286fe6;
  padding: 8px 8px;
}
.add_course
  .add_join
  .add_bottom
  ul
  li
  .add_choose
  .el-button--success.is-plain
  i {
  font-size: 12px;
}
.add_course .add_join .add_bottom ul li .add_choose .el-date-editor {
  width: 40%;
}

.add_course .add_join .add_bottom ul li .add_choose font {
  font-size: 16px;
  color: #000000;
  margin: 0 30px;
}
.add_course .add_join .add_bottom ul .add_img {
  margin-top: 20px;
}
.add_course .add_join .add_bottom ul .add_img .add_choose {
  width: 100%;
  margin-top: 0;
  display: flex;
  align-items: flex-end;
  position: relative;
}
.add_course .add_join .add_bottom ul .add_img .add_choose img {
  background: #444444;
}
.add_course .add_join .add_bottom ul .add_img .add_choose .file {
  width: 80px;
  height: 30px;
  position: absolute;
  left: 52%;
  bottom: 0;
  outline: none;
  border: none;
  opacity: 0;
}
.add_course .add_join .add_bottom ul .add_img .add_choose button {
  width: 80px;
  height: 30px;
  margin-left: 22px;
  border-radius: 4px;
  border: 1px solid #286fe6;
  font-size: 14px;
  outline: none;
  background: #fff;
  color: #286fe6;
}
.add_course .add_join .add_bottom ul li .add_choose img {
  width: 130px;
  height: 90px;
}
.add_course .add_join .add_bottom ul li .add_choose .add_word {
  width: 80%;
  text-align: left;
  font-size: 16px;
  color: #286fe6;
  padding-left: 0;
}
.add_course .add_join .add_submit {
  width: 56%;

  height: 40px;

  line-height: 40px;

  margin: 0 auto;

  text-align: center;

  background: #2f7dfe;

  border-radius: 4px;

  margin-top: 30px;

  font-size: 16px;

  color: #fff;
}
/* 添加课程弹窗结束 */
</style>


